<%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2017/4/7
  Time: 17:41
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<style type="text/css">
    #local-users-trees {
        min-width: 220px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0px;
        float: left;
    }

    .col-md-12 {
        padding-left: 0px;
    }

    .col-md-7 {
        padding-left: 0px;
    }
</style>
<!-- 页面标题 -->
<div class="pageheader">
    <div class="media">
        <div class="media-body">
            <ul class="breadcrumb">
                <li><a href="javascript:;"><span class="glyphicon glyphicon_menu_users_page"></span>用户</a></li>
                <li class="active">用户管理</li>
            </ul>
        </div>
    </div>
</div>
<!-- End 页面标题 -->

<!-- 页面内容 -->
<div class="contentpanel" ng-controller="UserController" ng-cloak style="overflow:auto;">

    <!-- 工具栏 -->
    <div class="media-options toolwrapper">

        <div class="media-options toolwrapper col-md-12">
            <div class="pull-left" id="device_btns">
                <button type="button" class="btn btn-primary" ng-click="openAddUserModal()" style="width:120px;">添加用户
                </button>
            </div>
        </div>
        <!-- pull-right -->
    </div>

    <!-- End 工具栏 -->
    <!-- 设备管控主页面 -->
    <div class="row">
        <!-- 用户信息 -->
        <div class="col-md-12 mapwrapper" id="map-div" style="padding-right:0px;">
            <table ng-table="userTableParams" class="table table-striped table-bordered table-hover ng-table-responsive"
                   ng-pagination="test.html"><!-- ng-pagination="test.html" -->
                <tr ng-repeat="user in $data">
                    <td data-title="'账号'" sortable="'username'">
                        <span >{{user.username}}</span></td>
                    <td data-title="'姓名'" sortable="'name'">
                        {{user.name}}
                    </td>

                    <td data-title="'操作'">
                        <button id="edit_btn" type="button"
                                class="btn btn-danger btn-xs" ng-click="openEditUserModel(user)"
                                style="width:48px;height:24px;">
                            <i class="fa fa-trash-o"></i> 编辑
                        </button>
                    </td>
                </tr>
            </table>
            <tm-pagination conf="paginationConf"></tm-pagination>
        </div>
    </div>
    <!-- eng 用户信息 -->
</div>
<!-- End 页面内容 -->

<script type="text/ng-template" id="userModal.html">
    <jsp:include page="partical/userModal.jsp"/>
</script>


<script type="text/ng-template" id="delUserModal.html">

        <div class="modal-header">
            <h4 class="modal-title" id="user_info_lb">删除用户</h4>
        </div>
        <div class="modal-body form-horizontal text-center">
            <div class="form-group">
                <span class="glyphicon glyphicon-warning-sign btn-lg"></span>确定删除用户？
            </div>
        </div>
        <div class="modal-footer">
            <button type="button" class="btn btn-default"  ng-click="cancel()">取消</button>
            <button type="button" class="btn btn-primary"  ng-click="save()">确定</button>
        </div>

</script>

